package com.molichuxing.services.property;

/**
 * @Author: zhaopenghui
 * @Description:
 * @Date: Created in 11:27 2020/08/28
 * @Modified By:
 **/
public enum StatisticsAssetRollbackOverdueTypeEnum {
    /**
     * 二次运营
     */
    SECONDARY_OPERATIONS(31, "二次运营"),
    /**
     * 销售
     */
    SELL(32, "销售"),
    /**
     * 在库
     */
    IN_STOCK(33, "在库"),
    /**
     * 报废车
     */
    ABANDONED_VEHICLE(34, "报废车"),
    /**
     * 丢失车
     */
    LOSE_VEHICLE(35, "丢失车"),
    /**
     * 待收车
     */
    STAY_BACK_VEHICLE(36, "待收车"),
    /**
     * 逾期及特殊-诉讼中
     */
    OVERDUE_AND_SPECIAL_IN_LAWSUIT(37, "诉讼中");

    int value;
    String name;

    StatisticsAssetRollbackOverdueTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }


    /**
     * 通过value获取枚举的name
     *
     * @param value
     * @return
     */
    public static String getName(int value) {
        StatisticsAssetRollbackOverdueTypeEnum enumerate = getEnum(value);
        return enumerate == null ? null : enumerate.getName();
    }

    /**
     * 通过value获取枚举
     *
     * @param value
     * @return
     */
    public static StatisticsAssetRollbackOverdueTypeEnum getEnum(int value) {
        for (StatisticsAssetRollbackOverdueTypeEnum enumerate : StatisticsAssetRollbackOverdueTypeEnum.values()) {
            if (enumerate.getValue() == value) {
                return enumerate;
            }
        }
        return null;
    }
}
